import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home,
    children: [
      {
        path: '/blog/:id',
        component: () => import(/* webpackChunkName: "blog" */ '../views/blog/Blog')
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
